package s15.e01.dividedbyzero;

public class Main {

	public static void main(String[] args) {
		try {
			Double[] doubles = { 2d, 3d };
		divide(3, 0);
			getElement(doubles, 4);

		} catch (ArrayIndexOutOfBoundsException e) {
			System.err.println("Array problem");

		} catch (ArithmeticException e) {
			System.err.println("Operation went wrong");

		} catch (Exception e) {
			System.err.println("Something went wrong");
		}
	}

	private static void divide(int arg1, int arg2) {
		System.out.println(arg1 / arg2);
	}

	private static Object getElement(Object[] objects, int index) {
		return objects[index];

	}

}
